<!--
 * @Description: 动画
 * @Author: rendc
 * @Date: 2022-09-23 11:14:44
 * @LastEditors: rendc
 * @LastEditTime: 2022-09-23 11:29:24
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>动画</title>
  <style>
    .main{ 
      width: 100px;
      height: 100px;
      background-color: pink;
      border-radius: 50%;
      /* 动画 */
      animation-name:myani;
      /* 动画时长 */
      animation-duration: 2s;
      /* 动画执行的次数 */
      animation-iteration-count: infinite;
    }
    .main:hover{ 
      /* 开始动画 */
      animation-play-state: paused;
    }
    /* 声明动画 */
    @keyframes myani {
        0% {
          background-color:pink;
          /* width:100px; */
          transform: scale(1);
        }
        25%{
          background-color:yellowgreen;
          /* width:75px; */
          /* height: 75px; */
        }
        50%{
          background-color:skyblue;
          /* width:50px;
          height: 50px; */
          transform: scale(0.5);
        }
        75%{
          background-color:gold;
          /* width:75px; */
          /* height: 75px; */
        }
        100%{
          background-color:pink;
          /* width:100px;
          height:100px; */
          transform: scale(1);
          transform: scale(0.5);


        }
      }
  </style>
</head>
<body>
  <div class="main">
    文本大小
  </div>
</body>
</html>